package homework;
import java.util.Scanner;
public class Domo4 {
    public static void main(String[] args) {
    int sum = 0;
    Scanner sc = new Scanner(System.in);
    for (int i = 0; i < 5; i++) {
        System.out.println("请输入成绩");
        int score = sc.nextInt();
        if(score < 0 || score > 100){
            System.out.println("你输入的成绩有误");
            break;
        }else{
            sum += score;
        }
    }
    System.out.println("sum: " + sum);
}
}
